/*
 * Copyright (c) 2020, 2023, keyila All rights reserved.
 *
 */
package com.clp.study.designPattern.templatePattern.prod;

import com.clp.bean.Result;

/**
 * @author clp
 * @version 1.0
 */
public class ApiTemplateDemo {
    public static void main(String[] args) {
        ApiTemplate apiTemplate=new ApiTemplate();
        Result result=Result.ok();
        apiTemplate.execute(result, new Action() {
            @Override
            public void validate() {
                System.out.println("开始效验");
            }

            @Override
            public void execute() {
                System.out.println("执行");
            }

            @Override
            public void after() {
                System.out.println("后续执行");
            }
        });
        System.out.println(result);
    }
}
